
mongoose    = require 'mongoose'
log4js      = require 'log4js'

log4js.configure
  appenders: [
      type: 'console'
  ]

logger = log4js.getLogger()

mongoose.connect 'mongodb://10.161.92.217:27017/bis'

mongoose.connection.on 'connected' , () ->
  logger.trace 'mongoose connected'
mongoose.connection.on 'error', () ->
  logger.trace arguments
  logger.error 'mongoose error'

require('./models')(mongoose)
